package com.zxy.ziems.server.device.pojo.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Null;
import lombok.Data;

/**
 * 设备类型关联属性
 * @author 10348359
 * @create 2024-03-20 22:14
 */
@Data
public class DeviceTypePropertyDTO {
    /**
     * 主键
     */
    @NotBlank(message = "主键ID不能为空", groups = {Update.class, Delete.class})
    @Null(message = "主键ID必须为空", groups = {Add.class})
    private String id;

    /**
     * 显示名称
     */
    @NotBlank(message = "设备类型ID不能为空", groups = {Update.class, Add.class})
    private String name;

    /**
     * 设备类型Code
     */
    @NotBlank(message = "设备类型ID不能为空", groups = {Update.class, Add.class})
    private String deviceTypeCode;

    /**
     * 属性Id 关联的DataType
     */
    @NotBlank(message = "设备属性ID不能为空", groups = {Update.class, Add.class})
    private String dataTypeId;

    /**
     * 显示的单位 关联的DataUnit
     */
    @NotBlank(message = "显示的单位ID 不能为空", groups = {Update.class, Add.class})
    private String unitId;

    public interface Add{}
    public interface Update{}
    public interface Delete {}
}
